//
//  ShopCarGroupModel.m
//  ShopCarDelete
//
//  Created by xhl on 16/7/7.
//  Copyright © 2016年 xhl. All rights reserved.
//

#import "ShopCarGroupModel.h"
#import "CellModel.h"

@implementation ShopCarGroupModel

+(instancetype)shopCarGroupModelWithDic:(NSDictionary*)dic
{
    ShopCarGroupModel *model = [[ShopCarGroupModel alloc] init];
    model.headerTitle = [dic objectForKey:@"headerTitle"];
    model.sectionDatas = [NSMutableArray array];
    //对sectionDatas 操作  将它包装一个装满CellModel 的数组
    for (NSDictionary *dict in [dic objectForKey:@"sectionDatas"]) {
        [model.sectionDatas addObject:[CellModel cellModelWithDic:dict]];
    }
    
    return model;
}

@end
